#include <Server.h>
#include <cstring>
#include <iostream>
using std::cin;
using std::cout;
using std::endl;

int main()
{
	// Create Server object.
	Server server_obj;

	// Create Server socket and set socket options.
	server_obj.CreateSocket(TCPSOCKET);		// No argument means TCPSOCKET
	server_obj.SetSocketOptions();

	// Initialise Server address struct and bind it with Server's socket.
	server_obj.InitialiseAddress(6000);		// No argument here will take default port.
	server_obj.Bind();
	server_obj.DisplayServerInfo();

	while(true)
	{
		// Listen for incoming connections.
		server_obj.Listen();
		server_obj.AddNewClient();
	}
	server_obj.CloseServerSocket();
	return 0;
}
